<form class="form-horizontal padding-15" id="delevery">
    <table class="table v-table table-auto-center">
        <thead>
        <tr>
            <th>
                <input type="checkbox" id="select_all">
            </th>
            <th>商品</th>
            <th>数量</th>
            <th>物流单号</th>
            <th>状态</th>
        </tr>
        </thead>
        <tbody>
        {foreach name='order_goods_list' item='goods'}
        <tr>
            <td>
                {if $goods.shipping_status > 0 || ($goods.refund_status != 0 && !in_array($goods.refund_status,[-1,-3]))}
                <input type="checkbox" name="select_goods" value="{$goods.shipping_status}" disabled>
                {else}
                <input type="checkbox" id="{$goods.order_goods_id}" value="{$goods.shipping_status}"
                       name="select_goods">
                {/if}
            </td>
            <td>
                <div class="media text-left">
                    <div class="media-left">
                        <img src="{:getApiSrc($goods.picture_info.pic_cover_mid)}" alt="" width="60" height="60">
                    </div>
                    <div class="media-body max-w-300">
                        <div class="line-2-ellipsis">{$goods.goods_name}</div>
                        <div class="small-muted line-2-ellipsis">
                            {foreach name='goods.spec' item='spec'}
                            {$spec.spec_name.':'.$spec.spec_value_name.' '}
                            {/foreach}
                        </div>
                    </div>
                </div>
            </td>
            <td>
                {$goods.num}
            </td>
            <td>
                {$goods.express_info.express_no ?: ''}
            </td>
            <td>
                {if $goods.refund_status != 0}
                <span class="text-danger">{$goods.status_name}</span>
                {else}
                <span class="text-danger">{$goods.shipping_status_name}</span>
                {/if}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    <div class="form-group">
        <label class="col-md-2 control-label">收货信息</label>
        <div class="col-md-10">
            <p class="form-control-static">
                <span class="mr-15">{$order_info.receiver_name}</span>
                <span class="mr-15">{$order_info.receiver_mobile}</span>
                <span class="">{$order_info.address . ' ' . $order_info.receiver_address}</span>
            </p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-2 control-label">快递公司</label>
        <div class="col-md-5">
            <select class="form-control" id="delivery_express_company">
                {foreach name='express_company_list' item='company'}
                <option value="{$company.co_id}" {if $company.co_id== $order_info.shipping_company_id}checked{/if}>{$company.company_name}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-md-2 control-label">快递订单</label>
        <div class="col-md-5">
            <input type="text" class="form-control" id="delivery_express_no">
            <p class="help-block">*发货后24小时内可以修改一次快递信息</p>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">备注</label>
        <div class="col-sm-5">
            <textarea class="form-control ta_resize" rows="4" id="delivery_seller_memo"
                      placeholder="备注"></textarea>
        </div>
    </div>
</form>
<script>
    $("#select_all").on('change',function () {
        var checked = $(this).prop('checked');
        $("input[name='select_goods'][value='0']").not(":disabled").prop("checked",checked);
    })
</script>